Overview of chapters
- CPU instruction set
- Branch, Branch with Link (B, BL)
- Data processing
- Instruction format
- Assembler syntax
- MOV and MVN - single operand
- CMN, CMP, TEQ and TST - no result written
- ADC, ADD, AND, BIC, OR, ORR, RSB, RSC, SBC, SUB - two operands
- Parameters
- Opcodes
- Synopsis
- The S bit
- Logical operations (AND, BIC, EOR, MOV, MVN, ORR, TEQ, TST)
- Arithmetic operations (ADC, ADD, CMP, CMN, RSB, RSC, SBC, SUB)
- The P flag
- Shifts
- Immediate operand rotates
- Using R15 as the destination or operand
- 32 bit operation
- Examples
- PSR transfer (MRS, MSR)
- Multiply and Multiply-Accumulate (MUL, MLA)
- Multiply Long and Multiply-Accumulate Long (UMULL, SMULL, UMLAL, SMLAL)
- Single data transfer (LDR, STR)
- Block data transfer (LDM, STM)
- Single data swap (SWP)
- Software interrupt (SWI)
- Coprocessor data operations (CDP)
- Coprocessor data transfers (LDC, STC)
- Coprocessor register transfers (MCR, MRC)
- Undefined instructions
- Instruction set summary
- Further instructions
- Example assembler fragments
- Using the conditional instructions
- Pseudo-random binary sequence generator
- Multiplication by a constant
- Multiplication by 2n (1,2,4,8,16,32...)
- Multiplication by 2n+1 (3,5,9,17...)
- Multiplication by 2n-1 (3,7,15...)
- Multiplication by 6
- Multiply by 10 and add in extra number
- General recursive method for Rb := Ra×C, C a constant
- Loading a word from an unknown alignment
- Sign/zero extension of a half word
- Return setting condition codes
- Full multiply